﻿@model ePhoneBook.Models.ReportTransactionModel
@{
    ViewBag.Title = "Transaction";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    Report Transaction</h2>
@using (@Html.BeginForm("LoadReport", "Report", FormMethod.Post, new { @class = ".form-search" }))
{
    <div class="container-fluid" id="divSearch">
        <div class="row-fluid">
            <div class="span2">
                @Html.LabelFor(m => m.PageIndex)
            </div>
            <div class="span4 ">
                @Html.TextBoxFor(m => m.PageIndex, new { @class = ".search-query" })
                @Html.ValidationMessageFor(m => m.PageIndex)
            </div>
            <div class="span2">
                @Html.LabelFor(m => m.PageSize)
            </div>
            <div class="span4">
                @Html.TextBoxFor(m => m.PageSize, new { @class = ".search-query" })
                @Html.ValidationMessageFor(m => m.PageSize)
            </div>
        </div>
        <div class="row-fluid">
            <div class="span2">
                @Html.LabelFor(m => m.WhereClause)
            </div>
            <div class="span4">
                @Html.TextBoxFor(m => m.WhereClause, new { @class = ".search-query" })
                @Html.ValidationMessageFor(m => m.WhereClause)
            </div>
            <div class="span4 offset2">
                <input type="submit" id="filter" value="Filter" class="btn btn-primary" />
                <input type="submit" id="export" value="Export" class="btn btn-primary" />
            </div>
        </div>
    </div>
}
<div class="container-fluid">
    @if (ViewData["Report"] != null)
    {
        @Html.Raw(ViewData["Report"])
    }
</div>
<div class="pagination container-fluid">
    <ul>
        <li><a href="#">Prev</a></li>
        <li class="active"><a href="#">1</a> </li>
        <li><a href="#">2</a></li>
        <li><a href="#">3</a></li>
        <li><a href="#">4</a></li>
        <li><a href="#">Next</a></li>
        <li><a href="#divSearch" onclick="javascript:focusResearchTextBox()">Up to Filter</a></li>
    </ul>
</div>
<script language="javascript">
    function focusResearchTextBox() {
        var pageIndex = document.getElementById("PageIndex");
        if (pageIndex != null) {
            pageIndex.focus();
        }
    }
</script>
